home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PROTX310.ZIP / PROTEXE.DOC < prev    next >
Text File  |  1997-08-13  |  44KB  |  1,033 lines

  1. ProtEXE v3.10 - EXE/COM encryption/validation/protection
  2. Copyright (c) 1995-1997 by Tom Torfs, all rights reserved
  3.  
  4.  
  5.                                -= MANUAL =-
  6.  
  7. 0.1 Table of contents
  8. -=-=-=-=-=-=-=-=-=-=-
  9.  
  10. 0.1 Table of contents
  11.  
  12. 1.1 Overview
  13. 1.2 Reasons for using ProtEXE
  14.  
  15. 2.1 Commandline usage
  16. 2.2 Configuration file
  17. 2.3 Interactive shell
  18.  
  19. 3.1 ProtEXE operation notes
  20. 3.2 Files that shouldn't be protected with ProtEXE
  21. 3.3 ProtEXE and executable compressors
  22. 3.4 ProtEXE and virus-scanners
  23. 3.5 ProtEXE and other operating systems & multitaskers
  24.  
  25. 4.1 Verifying the registration information
  26. 4.2 Testing the CRC failed message
  27.  
  28. 5.1 Reasons for registering ProtEXE
  29. 5.2 How to register ProtEXE
  30.  
  31. 6.1 Contacting the author
  32. 6.2 Where to find the most recent version of ProtEXE
  33.  
  34. 7.1 Errors, warnings & errorlevels
  35.  
  36. 8.1 Credits
  37.  
  38. 9.1 Disclaimer
  39.  
  40. 1.1 Overview
  41. -=-=-=-=-=-=
  42.  
  43. ProtEXE is a programmer's tool that protects your DOS executables (EXE & COM)
  44. from tampering and other corruption in three ways:
  45.         a) the code and data are encrypted
  46.         b) via a CRC any changes in the code and/or data and optionally
  47.            in the extra data (overlays etc.) are detected immediately
  48.         c) anti-debugging, anti-disassembling and anti-unpacking techniques
  49.            stop crackers from stepping through your programs with a debugger
  50.            or reverse-engineering them with a disassembler
  51.  
  52. 1.2 Reasons for using ProtEXE
  53. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  54.  
  55. If you're a programmer, you won't like it when some kiddie changes
  56. your precious programs' output into some useless rubbish, or changes
  57. your name by his/hers, or ...
  58. You wouldn't like it either if some cracker broke your programs'
  59. registration key routine or copy protection, or something like that.
  60. You would even like it less if someone changed your program into
  61. a logic bomb or virus.
  62. Just imagine what all this could do to your reputation as a programmer.
  63.  
  64. That's why programs like ProtEXE are there. Now why should you use
  65. ProtEXE instead of some other program that does basically the same job ?
  66.  
  67. Because:
  68.         - ProtEXE is secure: lots of anti-debugging techniques and
  69.           automatic polymorphic self-encryption and decryption stop
  70.           debuggers and disassemblers from examining the decryption
  71.           algorithm; anti-unpacking tricks stop automated unpacking
  72.           programs from removing the protection; one of the more
  73.           advanced anti-unpacking tricks is the tie option {+},
  74.           another advanced security feature is the runtime data decryption
  75.           system for C/C++, Pascal and assembly language {+}
  76.         - ProtEXE is fast: the decryption and CRC validation take
  77.           so little time that you won't see the difference between the
  78.           original and the protected version of a program
  79.         - ProtEXE protected EXE and COM files require only a little bit
  80.           more memory and disk space than the unprotected versions;
  81.           this space is well invested since it significantly enhances
  82.           your program's security
  83.         - ProtEXE can automatically call your favorite executable
  84.           compressor to make the executables more compact (a freely
  85.           usable executable compressor, ComprEXE, is included;
  86.           see COMPREXE.DOC for more details)
  87.         - ProtEXE has the ability to copy any extra data from the source
  88.           file to the target file (like some overlays); it can also
  89.           force overlaid programs to load their overlays from the new
  90.           position, allowing to protect some programs that would otherwise
  91.           be impossible to protect/compress
  92.         - ProtEXE can protect the DOS part of 'new executables', such as
  93.           Windows or OS/2 executables
  94.         - ProtEXE can CRC check the overlays and other extra data {+}
  95.         - ProtEXE can retain all the additional information in the EXE
  96.           header and can optionally fool the protected program into
  97.           thinking the header hasn't changed at all
  98.         - ProtEXE can include additional information (e.g. copyright
  99.           info) in the header of the EXE file
  100.         - ProtEXE can leave certain information in the beginning of the
  101.           EXE file (before CS:IP entry point) unencrypted; this is
  102.           especially handy for protecting device driver-EXEs etc.
  103.         - ProtEXE can protect programs that stay resident (TSRs)
  104.           (although some of the more advanced features will be disabled)
  105.         - ProtEXE has the ability to replace the message that's displayed
  106.           when the CRC fails by your own text {+}
  107.         - ProtEXE can optionally display a banner text before the program
  108.           gets run (useful for programs that take long to initialize etc.);
  109.           after this banner ProtEXE can optionally wait for a keypress,
  110.           echo the key pressed and/or abort by pressing ESC
  111.         - ProtEXE can optionally password-protect the executables, with
  112.           a customizable prompt and error message
  113.         - ProtEXE has a comfortable interactive shell which allows you
  114.           to use it without having to type long commandlines
  115.         - ProtEXE can read often used options from a configuration file
  116.           and change & save these options from the interactive shell
  117.         - ProtEXE displays statistics about the memory usage etc. of
  118.           the original, compressed (optional) and protected program
  119.         - ProtEXE is inexpensive: see ORDER.FRM for detailed pricing
  120.         - Once you purchased the registered or commercial version of
  121.           ProtEXE, you may protect as many programs as you like with it,
  122.           there are no royalties
  123.  
  124. 2.1 Commandline usage
  125. -=-=-=-=-=-=-=-=-=-=-
  126.  
  127. PROTEXE <oldfile>[.EXE|.COM] [<newfile>[.EXE|.COM]]
  128.    [-c[<compressor id>]] [-m<msgfile>] [-b<bannerfile>]
  129.    [-p<password>[,<prompt>,<error>]] [-t[<parameters>]] [-s<rol>]
  130.    [-r] [-k] [-o] [-e[k][o][c]] [-h] [-f] [-d] [-i<infofile>]
  131.  
  132. * Command line basics *
  133.  
  134. <oldfile> is the name of the executable to protect. <newfile> is the name
  135. of the protected executable. If you omit <newfile>, <oldfile> will be
  136. replaced and the original file will be stored as <oldfile>.OLD (unless
  137. you use option -o).
  138. If no extension is provided, .EXE or .COM is automatically appended.
  139.  
  140. You can specify multiple options on the command line to customize
  141. ProtEXE's behaviour. Note that for all options you can use the / switch
  142. character instead of the - character if you prefer.
  143.  
  144. If an option is followed by - (e.g. -o-) a previous setting (e.g. from
  145. the configuration file) is overridden. You can also override options
  146. which take a filename or other parameter, e.g. -m or -p.
  147.  
  148. An overview of the command line options can be displayed by putting
  149. the parameter /? (or -?) on the commandline.
  150.  
  151. You can put often used options in the configuration file (see chapter
  152. "Configuration file").
  153.  
  154. If you specify no parameters on the commandline, the interactive shell
  155. is started instead (see chapter "Interactive shell").
  156.  
  157. All options marked with {+} are available in the registered and
  158. commercial versions only.
  159.  
  160. * General options *
  161.  
  162. [-c[<compressor id>]]
  163.  
  164. With option -c you can call an executable compressor before protecting
  165. the EXE file. The actual compressor corresponding to the id is configured
  166. in the file PACKERS.PTX (see chapter "Structure of PACKERS.PTX" for more
  167. information). If no id is specified, the first compressor in the
  168. configuration file will be used.
  169.  
  170. By default the following compressors are supported:
  171. c  COMPREXE (default, included in archive)
  172. l  LZEXE
  173. p  PKLITE
  174. pc PKLITE commercial version
  175. d  DIET
  176. cp COMPACK
  177. t  TINYPROG
  178. u  UCEXE
  179. w  WWPACK
  180. x  XPACK
  181.  
  182. Using an executable compressor makes the executable smaller and adds some
  183. additional protection. There are several advantages to integrating them
  184. in ProtEXE: not only that you can do everything with one command line,
  185. but also that ProtEXE can not only calculate statistics relative to the
  186. intermediate compressed file but also to the original uncompressed file.
  187. Furthermore this method allows the use of the tie and data encryption
  188. options.
  189.  
  190. [-m<msgfile>] {+}
  191.  
  192. <msgfile> is the name of the file which is displayed when the CRC fails.
  193. This file may not be larger than 4096 bytes.
  194. The default message is:
  195.    CRC failed -> executable has been corrupted
  196. In the unregistered version, preceded by the ProtEXE version string.
  197. I would suggest you always use a message file, which clearly explains
  198. what has happened to the user of your program and what he/she should
  199. do about it.
  200.  
  201. [-b<bannerfile>]
  202.  
  203. <bannerfile> is the name of the file that should be displayed before running
  204. the program. This file is also limited to 4096 bytes.
  205.  
  206. You can put the following special codes as the last character in the
  207. bannerfile: (there may be nothing after this, including spaces)
  208.    \x01 (Ctrl-A)  Wait for a keypress w/o echo, pressing ESC aborts
  209.    \x02 (Ctrl-B)  Wait for a keypress w/o echo, no abort possible
  210.    \x03 (Ctrl-C)  Wait for a keypress with echo, pressing ESC aborts
  211.    \x04 (Ctrl-D)  Wait for a keypress with echo, no abort possible
  212.    \x05 (Ctrl-E)  Wait for a keypress with echo & CR/LF, pressing ESC aborts
  213.    \x06 (Ctrl-F)  Wait for a keypress with echo & CR/LF, no abort possible
  214.  
  215. If this control code is followed by a CR/LF, that CR/LF is stripped off.
  216. This allows you to create a bannerfile with a prompt on the same line
  217. using a text editor which forces the file to be terminated by a CR/LF.
  218.  
  219. In the unregistered version, the ProtEXE version string is inserted at
  220. the beginning of the banner.
  221.  
  222. [-p<password>]
  223.  
  224. Every time the program is run, <password> will have to be typed in. If the
  225. entered password is incorrect, the program will simply abort with an error.
  226. Spaces must be replaced by underscores. Use \ to quote the next character
  227. (\" for double quote, \, for comma and \\ to force a backslash).
  228. The password is case sensitive, so "PASSWORD" is not the same as "password"
  229. or "Password".
  230. The password itself isn't stored anywhere in the executable, not even in
  231. encrypted form. One-way functions are applied on it and those are compared
  232. against the expected values.
  233.  
  234. You can also specify password prompt and password error message files
  235. after the password, separated by commas. Note that the prompt file should
  236. not be terminated with a newline if you wish to have the input on the same
  237. line as the prompt.
  238. The default password prompt is: "Enter password:". The default password
  239. error message is "Invalid password".
  240. In the unregistered version the ProtEXE version string will be inserted
  241. in front of the password prompt.
  242.  
  243. NOTE: using the -p option also increases the startup stack size the
  244. protected executable will have by 80 bytes (unless option -ec is also used,
  245. see further). This does not affect the program's stack.
  246.  
  247. [-t[<parameters>]] {+}
  248.  
  249. This option ties the decryption module and the program together, so that
  250. even if a cracker would succeed in unpacking the executable, it would
  251. never work.
  252.  
  253. When using the -t option, ProtEXE does a test run of the program to
  254. analyze it. This test run should be representative for general
  255. program use. If such a representative run requires certain command
  256. line parameters, you should specify them after the -t option.
  257. Spaces must be replaced by underscores. Use \_ to force an underscore,
  258. \" to force a double quote and \\ to force a backslash.
  259.  
  260. The -t option will only be effective when applied directly on the
  261. uncompressed, unencrypted executable. Do not use an executable
  262. compressor before running ProtEXE -t, because otherwise only the
  263. compressor code would be tied to the decryption module, not the
  264. program itself. You should instead use the -c option if you wish
  265. to both compress and tie the executable.
  266.  
  267. The number of ties is limited to 64. If no ties are possible,
  268. the -t option is ignored. If the number of ties is less than 5,
  269. the executable is probably already protected/compressed, unless
  270. it is a very small executable.
  271.  
  272. If you use this option, you should test your executable *carefully*
  273. before assuming it works; not all executables like the tie option.
  274.  
  275. The -t option is disabled when you use -r to protect a TSR program.
  276.  
  277. [-s<rol>] {+}
  278.  
  279. In the registered and commercial versions of ProtEXE, you can use the
  280. external PTXCrypt programming libraries for C/C++, Pascal and assembly
  281. language. These libraries can be extracted using PTXCRYPT.EXE if you
  282. have a valid registration key.
  283.  
  284. Once you registered, these libraries can freely be used to encrypt/decrypt
  285. your data (using a 64-bit XOR encryption, thus not subject to US export
  286. restrictions) via a randomly chosen key which is provided by the ProtEXE
  287. runtime decryption module, effectively making the data unaccessible
  288. without that protection module.
  289.  
  290. You can also specify a user defined 32-bit rol-value to 'personalize'
  291. the encryption system. It is highly recommended to use a unique value
  292. for all your programs, as this significantly enhances their security.
  293.  
  294. This 32-bit rol-value should be passed in hexadecimal notation (8 digits
  295. from 0..9 and A..F) after the -s parameter.
  296.  
  297. [-r]
  298.  
  299. This option allows ProtEXE to protect programs that stay resident in
  300. memory (commonly known as TSR programs).
  301.  
  302. This option disables some of the advanced features and also reduces
  303. the security of the protected executable, so you should only use
  304. it when absolutely necessary.
  305.  
  306. In some (rare) cases, using option -r may be required to protect a
  307. non-TSR program, too. It's always worth a try, when your program
  308. refuses to work after protection.
  309.  
  310. The following options are disabled when using -r: -t, -eo, -f.
  311.  
  312. [-k]
  313.  
  314. This option tells ProtEXE to leave the original code 100% intact.
  315. This may be necessary when the program performs some sort of self-check.
  316.  
  317. If you do not use option -k, ProtEXE may make some minor modifications
  318. to the code to enhance the security.
  319.  
  320. [-o]
  321.  
  322. If option -o is given, the original file will be deleted instead of
  323. renamed to .OLD. Using this option is not recommended.
  324. This option is ignored if an output file is specified.
  325.  
  326. * EXE-only options *
  327.  
  328. [-e]
  329.  
  330. EXE files contain the length of actual code/data in their header.
  331. Sometimes the EXE file contains data after this, which is not loaded
  332. when the program is run, but which might be read separately afterwards
  333. (overlays). This may also be debug info, used by a symbolic debugger
  334. (such as Turbo Debugger), but not required by the program itself. It
  335. may also be the 'new executable' part for Windows, OS/2, ... executables.
  336.  
  337. If option -e is given, any extra data in an EXE-file is simply copied into
  338. the target file, instead of being stripped off. This doesn't guarantee that
  339. the extra data is still useful after the protection. If you get the
  340. 'stripping extra data' warning and the protected program doesn't work, you
  341. should try using this option.
  342.  
  343. [-ek]
  344.  
  345. If the program has overlays and it doesn't work with option -e, there is
  346. a chance the overlay positions are hardcoded in the program. In that case
  347. try using option -ek. This forces the extra data to be kept at the same
  348. position as in the original file.
  349.  
  350. The -ek option is also required to protect most types of 'new executables'
  351. (e.g. Windows or OS/2 executables). However, it will usually only work with
  352. programs that have an independant DOS part (not the typical DOS stub of
  353. 'This program cannot run in a DOS session' or something like that), for
  354. the reason below.
  355.  
  356. The -ek option requires the protected code to be smaller than or equal to
  357. the unprotected version. If that isn't the case, ProtEXE shows a warning
  358. and the extra data will be relocated anyway. In that case, you should use
  359. the -c option to compress the code first. In fact, this will usually be
  360. necessary to use the -ek option. If the compression fails or isn't
  361. significant enough, there's not much more you can do.
  362.  
  363. [-eo]
  364.  
  365. An alternative to the -ek option for programs that hardcode their overlay
  366. positions, is the -eo option. This option forces the program to read the
  367. overlays from the new position.
  368. NOTE: this option only works for handle file I/O functions. FCBs are not
  369. supported, as they are hardly ever used for file I/O anymore.
  370.  
  371. Some programs use an overlay system that is incompatible with ProtEXE -eo.
  372. You should try using option -ek to protect these instead.
  373.  
  374. This does not work for 'new executables', only for plain DOS programs.
  375.  
  376. The -eo option is disabled when you use -r to protect a TSR program.
  377.  
  378. The -eo option is ignored if the -ek option is also used (no need to
  379. relocate overlays if you keep them at the same position).
  380.  
  381. [-ec] {+}
  382.  
  383. If you add the letter c after the option -e, the overlays will also be
  384. CRC checked every time you run the program.
  385. NOTE: using the -ec option also increases the startup stack size the
  386. protected executable will have by 512 bytes. This does not affect
  387. the program's stack.
  388.  
  389. You can combine the -ek/-eo and -ec options into -ekc/-eoc or -eck/-eco.
  390.  
  391. [-h]
  392.  
  393. Option -h disables packing the header. All additional information in the
  394. EXE header will be copied to the target file.
  395. Using this option can allow some otherwise unprotectable executables
  396. to be protected.
  397.  
  398. [-f]
  399.  
  400. In some (rare) cases, using option -h is not enough, because the program
  401. expects the exact same header to be found (including the memory paragraphs
  402. etc. fields). This option fakes the old header to be presented to the
  403. program if it tries to read its own header.
  404. However, if the program depends on these fields having certain values
  405. other than as a kind of self-check, there is a chance it will not
  406. function properly after protection.
  407. NOTE: this option only works for handle file I/O functions. FCBs are not
  408. supported, as they are hardly ever used for file I/O anymore.
  409.  
  410. The -f option is disabled when you use -r to protect a TSR program.
  411.  
  412. [-d]
  413.  
  414. Option -d leaves all code before the CS:IP entry point in the EXE file
  415. unencrypted. It is obvious that you should only use this option if really
  416. necessary. An example where this option is necessary is to protect
  417. EXE files that are in fact device drivers (such as SETVER.EXE,
  418. EMM386.EXE etc.). But keep in mind that all the actual device driver
  419. code (= before CS:IP entry point) will remain unencrypted. Using the
  420. -d option is not a guarantee at all that the device driver will still
  421. be usable after the protection.
  422.  
  423. [-i<infofile>]
  424.  
  425. <infofile> is the name of the file containing the text that is to be
  426. included in the header of the EXE file (e.g. copyright info). This file
  427. is limited to 16384 bytes.
  428.  
  429. If you begin this file with \x1B[2J and end it with \x1A, you can
  430. display the text using TYPE <name of EXE file>.
  431.  
  432. 2.2 Configuration file
  433. -=-=-=-=-=-=-=-=-=-=-=
  434.  
  435. The configuration file is named CONFIG.PTX and must be in the same
  436. directory as PROTEXE.EXE or in any directory of the PATH.
  437.  
  438. The file should contain one commandline option per line. The help
  439. option (-?) and filenames to protect are not allowed.
  440. Lines beginning with ; (comments) and blank lines are ignored.
  441.  
  442. An option specified in the configuration file can always be
  443. overridden on the commandline (see "Commandline usage").
  444.  
  445. You can also create a configuration file from within the interactive
  446. shell (see chapter "Interactive shell").
  447.  
  448. 2.3 Interactive shell
  449. -=-=-=-=-=-=-=-=-=-=-
  450.  
  451. When you start ProtEXE without parameters, the interactive shell is
  452. started. In this shell you can browse through your directories and
  453. disks and select any executables you wish to protect. If you move
  454. the lightbar over an executable and press Enter, that file will
  455. be protected. You will be asked whether you want to use the same
  456. file as targetfile, or a different file. Then the normal, non-
  457. interactive part of ProtEXE will be spawned with the correct
  458. settings. After finishing it waits for a keypress (to allow you
  459. to examine the statistics or a possible error message), and then
  460. returns to the shell.
  461.  
  462. You can also customize the options and optionally save them to disk.
  463. You can switch between the files and the options with the left & right
  464. arrow keys. You can change an option by moving the lightbar over it and
  465. pressing Enter. Press F1 for a quick help screen about the used keys.
  466.  
  467. Just like in the commandline mode, the registered/commercial-only options
  468. are disabled in the unregistered evaluation version.
  469.  
  470. 2.4 Structure of PACKERS.PTX
  471. -=-=-=-=-=-=-=-=-=-=-=-=-=-=
  472.  
  473. The file PACKERS.PTX must be in the same directory as PROTEXE.EXE
  474. or in any directory of the PATH.
  475.  
  476. Any non-blank line in PACKERS.PTX that does not begin with a
  477. semicolon (comment), has the following structure:
  478. (different fields are separated by at least one space,
  479.  all fields are case insensitive except the commandline)
  480.  
  481. <id> <exe> <com> <backup> <cmdline>
  482.  
  483. <id> is a short abbreviation to identify the compressor. It must
  484. be passed on the commandline after -c (see the chapter "How to
  485. use ProtEXE" for more information).
  486.  
  487. <exe> is Y or N depending on wether the compressor supports EXEs.
  488.  
  489. <com> is Y or N depending on wether the compressor supports COMs.
  490.  
  491. <backup> is either - or the extension of the backup file created
  492. by the compressor. It will be cleaned up by ProtEXE automatically.
  493.  
  494. <cmdline> is the commandline to execute when calling the compressor.
  495. It is executed the same way as if you would type it in from the
  496. DOS command prompt, so you don't need to specify a full path and
  497. extension of the compressor program, as long as it is somewhere
  498. in the PATH or in the current directory.
  499. You can also use the macros %F and %T in the commandline. %F expands
  500. to the filename of the program being compressed, and %T (optionally)
  501. expands to the filename of the target program. If you don't specify
  502. %T, ProtEXE will assume the source and target files are the same.
  503.  
  504. See the default PACKERS.PTX for an example.
  505.  
  506. 3.1 ProtEXE operation notes
  507. -=-=-=-=-=-=-=-=-=-=-=-=-=-
  508.  
  509. ProtEXE tags a little code module of its own to the program. That module
  510. decrypts the program in memory, performs all necessary segment relocations,
  511. restores the stack etc., and then jumps to the original entry point.
  512. That's the basic system in a nutshell. In practice, the code module does
  513. more, such as CRC-checking, password-verifying, anti-debugging and
  514. anti-unpacking techniques, etc.
  515.  
  516. Different ProtEXE features execute in the following order:
  517.    * load image CRC check
  518.    * overlay CRC check (optional)
  519.    * registration info
  520.    * banner (optional)
  521.    * password (optional)
  522.  
  523. It is possible to use ProtEXE multiple times on a program, also with
  524. different combinations of options. However, doing so doesn't make much
  525. sense, as the program would only get bigger (and slightly slower,
  526. especially after multiple layers, and even more so if overlay crc
  527. checking is turned on) with not much improvement in security. If
  528. someone would be capable of unpacking one layer of ProtEXE, there
  529. is no reason why he/she couldn't unpack two or more.
  530.  
  531. 3.2 Files that shouldn't be protected with ProtEXE
  532. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  533.  
  534. ProtEXE can essentially only protect DOS executables. If you try to protect
  535. a new executable like those for Windows or OS/2 and most DOS extenders
  536. (PharLap, DOS/4GW,...) (protected mode programs), ProtEXE will give
  537. a warning and only protect the DOS part. See the notes on option -ek
  538. and warning W07 for more details.
  539.  
  540. To protect programs that are in fact device drivers, like SETVER.EXE,
  541. EMM386.EXE, etc. you should use the -d option. This is still no guarantee
  542. the device driver will still function correctly after the protection,
  543. but without it it will certainly not work; ProtEXE will give a warning
  544. if you try to protect such an executable without the -d option.
  545.  
  546. COM files may not be larger than approx. 60-62K. Otherwise they can't
  547. be protected by ProtEXE, because the protected COM would exceed 64K.
  548. COM files smaller than 4 bytes can't be protected, either.
  549. In both cases, you should convert them to an EXE file using the
  550. included COM2EXE utility.
  551.  
  552. EXE files with overlays in the EXE-file will require the use of the
  553. -e option with ProtEXE. If the protected executable won't function,
  554. you should try using options -ek, -eo, -h, -f and/or -d.
  555. Please read the information in the chapter "Commandline usage"
  556. concerning these options first.
  557.  
  558. Files that read/write data or code directly to their images on disk
  559. won't work with ProtEXE (or with any file compressor). Note that this
  560. does not apply to overlays. A program is free to write to its overlays,
  561. unless you have protected the program with option -ec of course.
  562.  
  563. Programs that spawn other programs (e.g. DOS shell) work fine with
  564. ProtEXE.
  565.  
  566. Terminate & stay resident programs (TSRs) also work, but require
  567. the use of the -r option (see chapter "Commandline usage").
  568.  
  569. Self-extracting EXE files (such as those created by PKZIP, LHA, ARJ,
  570. RAR, ...) can be protected by ProtEXE. For most (if not all) of these
  571. you must use the -e option, and for LHA you must use -eo.
  572.  
  573. 3.3 ProtEXE and executable compressors
  574. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  575.  
  576. Yes. It is even supported directly by ProtEXE. See the option -c
  577. in the chapter "Commandline usage" and the chapter "Structure of
  578. PACKERS.PTX" for more information.
  579.  
  580. A freely usable executable compressor, ComprEXE, is included in
  581. the archive. See COMPREXE.DOC for more information.
  582.  
  583. I encourage using a compressor with ProtEXE, because that way the
  584. program becomes a lot smaller and a little bit harder to crack.
  585.  
  586. What you shouldn't do is first run ProtEXE and then the compressor.
  587. ProtEXE scrambles the code so that it becomes uncompressable.
  588. In most cases the compressors refuse to compress it because instead
  589. of becoming smaller the code would become larger.
  590.  
  591. 3.4 ProtEXE and virus-scanners
  592. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  593.  
  594. Some heuristic virus scanners, such as F-Prot, may say that ProtEXE
  595. and programs protected with it are suspicious because they contain
  596. anti-disassembling and anti-debugging tricks.
  597.  
  598. This is absolutely normal, since that is the purpose of ProtEXE,
  599. so you may safely ignore these warnings, unless you seriously
  600. suspect someone has infected the program with a virus and then
  601. encrypted it with ProtEXE.
  602.  
  603. 3.5 ProtEXE and other operating systems & multitaskers
  604. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  605.  
  606. ProtEXE has been tested and works fine under the following operating
  607. systems & multitaskers:
  608.    - DOS
  609.    - Qemm386, EMM386, ...
  610.    - Desqview
  611.    - Windows 3.X, 95 and NT
  612.    - OS/2 Warp 3 & 4
  613.    - Linux DOSEMU
  614.  
  615. 4.1 Verifying the registration information
  616. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  617.  
  618. You can always verify the registration information in a ProtEXE'd
  619. executable. Just run the protected program with the following command
  620. line:
  621.  
  622. <progname> ~~~ProtEXE-RegInfo~~~
  623.  
  624. There may be no more parameters after this, and the parameter is
  625. case-sensitive, so it must be typed in exactly as above.
  626.  
  627. If you want to do this often, you might find it more convenient to
  628. use PROTXVER.BAT to do this for you. Just type PROTXVER followed
  629. by the name of the executable.
  630.  
  631. If the program was damaged, it will abort with a CRC error before
  632. it gets to the registration info, to reduce the risk of more damage
  633. (see also: ProtEXE operation notes).
  634.  
  635. When the program was not protected with ProtEXE v3.0 or later, it will
  636. probably give an 'illegal parameter' error message or just ignore the
  637. parameter and run normally. This is normal behaviour.
  638.  
  639. Apart from the ProtEXE version, copyright message and registration
  640. information, also an 8-digit hexadecimal code will be displayed
  641. (only ProtEXE 3.10 or later). This is the UNIX timestamp of the
  642. protection (number of seconds since 1970-01-01, 00:00) and can be
  643. used to distinguish different distribution versions of a program.
  644.  
  645. In the commercial version, no registration name is displayed but
  646. just "Commercial version".
  647.  
  648. 4.2 Testing the CRC failed message
  649. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  650.  
  651. You can test the CRC failed message of a ProtEXE'd executable by
  652. using the TestMsg tool. Just type TESTMSG <executable> to view
  653. the message.
  654.  
  655. TestMsg will first verify the registration information (see previous
  656. chapter) to make sure the executable has been protected with ProtEXE;
  657. this is necessary to avoid crashes or other kinds of strange behaviour.
  658.  
  659. TestMsg only works on executables protected with ProtEXE v3.0 or later.
  660.  
  661. 5.1 Reasons for registering ProtEXE
  662. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  663.  
  664. The unregistered version may freely be evaluated for a period of 30 days.
  665. After this period you should register your copy or purchase the commercial
  666. version (see ORDER.FRM for more information). By doing so, you support the
  667. shareware concept.
  668.  
  669. You may not distribute programs protected with the unregistered evaluation
  670. version of ProtEXE, whether it is freeware, shareware or commercial
  671. software. Giving copies of your program to a small number of people for
  672. alpha- and betatesting is not considered distribution; spreading your
  673. program via bulletin board systems, computer networks, shareware vendors
  674. and retail is.
  675.  
  676. Several features are not available in the unregistered version:
  677.    * customizing the CRC failed message
  678.    * CRC-checking the extra data
  679.    * the tie option
  680.    * the PTXCrypt runtime data encryption/decryption system
  681.  
  682. Also, in the unregistered version the ProtEXE version string is
  683. inserted before the default CRC failed message, the banner, and
  684. the password prompt. The fact that these are not present in the
  685. registered version also means a small reduction in the code size.
  686.  
  687. Keep in mind that the registration information can always be verified
  688. using the method described in the chapter "Verifying the registration
  689. information".
  690.  
  691. 5.2 How to register ProtEXE
  692. -=-=-=-=-=-=-=-=-=-=-=-=-=-
  693.  
  694. An order form named ORDER.FRM is included. Instructions on how
  695. to register or purchase the commercial version and information about
  696. payment methods can be found in there.
  697.  
  698. The registration key can be put in the directory where PROTEXE.EXE is in,
  699. or in any directory of the PATH. It will then unlock ProtEXE's registered
  700. only features and it will also allow the extraction of the PTXCrypt
  701. libraries using PTXCRYPT.EXE.
  702.  
  703. The registration key will also work on future versions. Should the key
  704. format ever be changed (e.g. for security reasons), all registered
  705. users will receive their new key as soon as possible.
  706.  
  707. The commercial version does not require a registration key. Commercial
  708. users who have an email or netmail address will automatically be sent
  709. major new versions. They can also be downloaded from 80x86 BBS, instead.
  710. See ORDER.FRM for more information.
  711.  
  712. 6.1 Contacting the author
  713. -=-=-=-=-=-=-=-=-=-=-=-=-
  714.  
  715. The author can be contacted through the following channels:
  716.  
  717. E-mail: (preferably try the addresses in this order)
  718.         tomtorfs@mail.dma.be
  719.         tomtorfs@iname.com
  720.         tom.torfs@f516.n292.z2.fidonet.org
  721.  
  722. Netmail: (preferably use crashmail)
  723.         Tom Torfs, 2:292/516@fidonet.org
  724.  
  725. BBS: (private message to sysop)
  726.         80X86 BBS
  727.         +32-15-24.62.32
  728.         24h/24h
  729.         28800bps V.34/V.FC
  730.  
  731. Snailmail:
  732.         Tom Torfs
  733.         Cuperuslei 12
  734.         B-2220 Heist-op-den-Berg
  735.         BELGIUM
  736.  
  737. If you wish to encrypt your correspondence using PGP, this is my PGP
  738. public key:
  739.  
  740. -----BEGIN PGP PUBLIC KEY BLOCK-----
  741. Version: 2.6.1
  742.  
  743. mQBtAzPwlx4AAAEDAJrir/T++tMCp0+VqyiakX5TA2oDfmYpVb9gI7DlniceL6bx
  744. HNGeLlVbFjN9/Jm0aVhBDsL1NFpfk5ixv40txpZIJYskg5TpZbsaIMjA4tNpLjQQ
  745. vvsaifXl6SFqYIdxbQAFEbQgVG9tIFRvcmZzIDx0b210b3Jmc0BtYWlsLmRtYS5i
  746. ZT4=
  747. =Pbll
  748. -----END PGP PUBLIC KEY BLOCK-----
  749.  
  750. My public key can also be obtained from http://bewoner.dma.be/tomtorfs
  751. or http://80x86.home.ml.org, or can be downloaded from 80x86 BBS or
  752. file-requested as PGPKEY.
  753.  
  754. 6.2 Where to find the most recent version of ProtEXE
  755. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  756.  
  757. ProtEXE world registration site:
  758.    80X86 BBS
  759.    (+32) (0)15-24.62.32
  760.    28800 V.34/V.FC
  761.    24h/24h
  762.    2:292/516@fidonet.org
  763.    tomtorfs@mail.dma.be / tomtorfs@iname.com
  764.  
  765. File request magic name PROTEXE for the latest version
  766.  
  767. You can also download the latest version from the ProtEXE support page:
  768.    http://bewoner.dma.be/tomtorfs/protexe
  769. This page can also be accessed through the following alias: (which will
  770. remain constant even if the above might change)
  771.    http://protexe.home.ml.org
  772.  
  773. You should also be able to find the most recent ProtEXE versions on
  774. ftp://ftp.cdrom.com/simtelnet/pub/simtelnet/msdos/pgmutl a few days
  775. after the release.
  776.  
  777. If you're a registered user and have an e-mail or netmail address,
  778. you will be notified of new versions and important bug fixes.
  779.  
  780. 7.1 Errors, warnings & errorlevels
  781. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  782.  
  783. These are the errors and warnings that ProtEXE may give:
  784.  
  785. ERROR E01: bad option: <option>
  786. An invalid parameter was passed on the command line or in the configfile.
  787. A short usage info screen will be displayed. If you need more information,
  788. check out the chapter "Commandline usage".
  789.  
  790. ERROR E02: no filename specified on command line
  791. You didn't specify a source file to protect. The usage info screen
  792. will be displayed.
  793.  
  794. ERROR E03: neither COM nor EXE form of source file exists
  795. The filename you entered as a source file does not exist in either
  796. COM or EXE form. Correct the error and retry.
  797.  
  798. ERROR E04: source file not found
  799. The source file you specified does not exist. Correct the error and
  800. retry.
  801.  
  802. ERROR E05: can't rename file
  803. ProtEXE was unable to rename the source file to extension .OLD or to
  804. rename the temporary file. This might occur if there was already an
  805. .OLD file with the read-only attribute on.
  806.  
  807. ERROR E06: same file specified as source and target file
  808. You entered the same filename as source and target file, or you tried
  809. to protect an .OLD file with the one-parameter form. Correct the error
  810. or rename the .OLD file.
  811.  
  812. ERROR E07: error opening source file
  813. ProtEXE was unable to open the source file you specified. Make sure
  814. this file exists and does not have any special attributes or is not
  815. currently in use by another process.
  816.  
  817. ERROR E08: error creating target file
  818. ProtEXE was unable to create the target file you specified. Make sure
  819. that no file with that name and any special attributes exists already
  820. or is currently in use. Make sure the disk is not full, and you're
  821. not trying to create the targetfile in a full root directory or
  822. on a read-only medium.
  823.  
  824. ERROR E09: can't read message file
  825. ProtEXE was unable to read the message file you specified. Make sure
  826. this file exists and does not have any special attributes or is not
  827. currently in use by another process.
  828.  
  829. ERROR E10: message file is too large (max 4096 bytes)
  830. The message file you specified is too large. Make sure you specified
  831. the correct file or make it smaller.
  832.  
  833. ERROR E11: can't read banner file
  834. ProtEXE was unable to read the banner file you specified. Make sure
  835. this file exists and does not have any special attributes or is not
  836. currently in use by another process.
  837.  
  838. ERROR E12: banner file is too large (max 4096 bytes)
  839. The banner file you specified is too large. Make sure you specified
  840. the correct file or make it smaller.
  841.  
  842. ERROR E13: can't read password prompt file
  843. ProtEXE was unable to read the password prompt file you specified.
  844. Make sure this file exists and does not have any special attributes
  845. or is not currently in use by another process.
  846.  
  847. ERROR E14: password prompt file is too large (max 1024 bytes)
  848. The password prompt file you specified is too large. Make sure you
  849. specified the correct file or make it smaller.
  850.  
  851. ERROR E15: can't read password error message file
  852. ProtEXE was unable to read the password error message file you specified.
  853. Make sure this file exists and does not have any special attributes
  854. or is not currently in use by another process.
  855.  
  856. ERROR E16: password error message file is too large (max 1024 bytes)
  857. The password error message file you specified is too large. Make sure
  858. you specified the correct file or make it smaller.
  859.  
  860. ERROR E17: can't read info file
  861. ProtEXE was unable to read the info file you specified. Make sure
  862. this file exists and does not have any special attributes or is not
  863. currently in use by another process.
  864.  
  865. ERROR E18: info file is too large (max 16384 bytes)
  866. The info file you specified is too large. Make sure you specified
  867. the correct file or make it smaller.
  868.  
  869. ERROR E19: file is too small to protect (must be at least 4 bytes)
  870. You tried to protect a program smaller than 4 bytes. No use in
  871. protecting such a small program.
  872.  
  873. ERROR E20: COM file is too large to protect
  874. You tried to protect a COM file that would require more than 64K when
  875. protected. In that case you should convert it to an EXE file using the
  876. included COM2EXE utility. Another possibility is that the file is not a
  877. valid COM nor a valid EXE file, but some sort of datafile.
  878.  
  879. ERROR E21: invalid executable after compression
  880. The compressor rendered the executable invalid. Use another compressor
  881. or don't use compression.
  882.  
  883. ERROR E22: error creating temporary file <filename>
  884. ProtEXE was unable to create a temporary file.
  885. Make sure the disk is not full or read-only.
  886.  
  887. ERROR E23: not enough memory
  888. You don't have enough conventional memory free for ProtEXE and/or
  889. the interactive shell to run.
  890. Remove any TSR's and device drivers you don't need.
  891.  
  892. WARNING W01: ignoring registered-only option <option>
  893. You tried to use a registered-only option in the unregistered
  894. evaluation version. Register!
  895.  
  896. WARNING W02: ignoring option <option>
  897. You specified an EXE only option, but the program isn't an EXE;
  898. or you specified the -t, -eo or -f options together with -r.
  899. The option will be ignored.
  900.  
  901. WARNING W03: stripping extra data/overlays
  902. The source file contained extra data such as debug info or overlays.
  903. If the program doesn't work after protecting it, try using option
  904. -e, -ek or -eo.
  905.  
  906. WARNING W04: no extra data/overlays found, ignoring -e? option
  907. You specified the -e, -eo or -ec option but no extra data was found
  908. in the EXE file. The -e? option will be ignored.
  909.  
  910. WARNING W05: EXE is probably device driver; using -d option advised
  911. You tried to protect an EXE file which was in fact a device driver
  912. without using the -d option. Examples of these executables are
  913. EMM386.EXE, SETVER.EXE etc.
  914. You should use the -d option to protect this kind of executables,
  915. otherwise the protected executable will most likely not function.
  916. Read the notes on this option in the chapter "Commandline usage"
  917. first.
  918. NOTE: there is a very small chance that this warning might come up
  919. erroneously if ProtEXE incorrectly detects the EXE as being a
  920. device driver; if you're absolutely sure the EXE is not a device
  921. driver you can safely ignore this warning.
  922.  
  923. WARNING W06: target load module too large - ignoring option -ek
  924. The extra data has to be relocated because the target program has
  925. become too large after the protection to keep the extra data at
  926. the same position.
  927. You can solve this by using the -c option to compress the DOS
  928. part of the executable. If the compression fails (e.g. because
  929. the file was already compressed), this is not possible.
  930.  
  931. WARNING W07: EXE is new executable - protecting DOS stub only
  932. The EXE file is a new executable. Examples of such new executables
  933. are Windows and OS/2 executables. Also most DOS extenders (protected
  934. mode programs), e.g. PharLap, DOS/4GW,... will use new executables.
  935. Only the DOS part of the executable will be protected. You should
  936. also use option -ek if you want to keep the new executable part
  937. intact.
  938.  
  939. WARNING W08: compressor does not support COM/EXE-format executables
  940. When protecting a COM/EXE file, you used the -c option with a
  941. compressor that does not support that format of executable (for
  942. example LZEXE does not support the COM format).
  943. The executable will remain uncompressed.
  944. Convert the COM file to an EXE file using the included COM2EXE
  945. utility, or use another compressor which supports EXE files.
  946.  
  947. WARNING W09: compression failed
  948. The compressor was unable to compress the executable; the executable
  949. will remain uncompressed.
  950. There are different possible reasons for this to happen:
  951. 1) The executable was already compressed and/or encrypted (you can
  952. check this by examining the compressor's screen output).
  953. Don't compress/encrypt the executable before running ProtEXE, or
  954. just don't tell ProtEXE to try compressing it again. In some rare
  955. cases using another compressor might help, but don't count on it.
  956. 2) The compressor program could not be started (you will normally
  957. see a "bad command or filename" error message).
  958. Make sure the compressor program is somewhere in your PATH.
  959. 3) A disk error (e.g. disk full) occurred.
  960. Fix the problem and retry.
  961.  
  962. WARNING W10: can't remove file <filename>
  963. ProtEXE was unable to delete a file (temporary file or the original
  964. file if -o is used).
  965. This could be caused by another process accessing the file at the
  966. same time, special attributes, or unsufficient access rights to delete
  967. the file.
  968.  
  969. WARNING W11: error in PACKERS.PTX (line <linenumber>)
  970. The packer configuration file contains an error at the specified
  971. line.
  972. ProtEXE will work, but the compressor specified at that line
  973. will be unusable.
  974. Fix the problem and retry. Also see the chapter "Structure of
  975. PACKERS.PTX".
  976.  
  977. WARNING W12: unknown compressor
  978. You specified an unrecognized compressor id on the command line.
  979. The executable won't be compressed.
  980. Make sure the PACKERS.PTX file is in the same directory as the
  981. executable or in any directory of your PATH and retry.
  982.  
  983. WARNING W13: error analyzing program; ignoring option -t
  984. An error occurred while analyzing the program. A possible cause
  985. is not enough memory.
  986. The -t option will be ignored.
  987.  
  988. WARNING W14: no ties possible; ignoring option -t
  989. You specified option -t, but there are no ties possible with the
  990. program. A possible cause is that this program is already protected
  991. and/or compressed, or that you didn't specify the right parameters
  992. after the -t option.
  993. The -t option will be ignored.
  994.  
  995. If an error occurs, ProtEXE will abort with the errorlevel set to
  996. the corresponding error number.
  997. Warnings are not fatal and don't cause an abort.
  998. If no error occurred, ProtEXE will exit with errorlevel 0.
  999.  
  1000. If you use the interactive shell, ProtEXE doesn't exit upon an error
  1001. but waits until a key is pressed and returns to the shell. The only
  1002. error that might occur in the shell so that it aborts with an error-
  1003. level other than zero is not enough memory (only if that error
  1004. would occur in the shell itself, not during protection).
  1005.  
  1006. 8.1 Credits
  1007. -=-=-=-=-=-
  1008.  
  1009. Thanks to the following betatesters for helping me make ProtEXE
  1010. bug-free: (in alphabetical order)
  1011.    Olivier Baum
  1012.    Jochen De Smet
  1013.    Bulent Eren
  1014.    Jeroen Jacobs
  1015.    Heiko Laternicht
  1016.    Marcel Van Den Dries
  1017.  
  1018. And of course a big thanks to all registered users of ProtEXE. Your
  1019. support keeps me going !
  1020.  
  1021. 9.1 Disclaimer
  1022. -=-=-=-=-=-=-=
  1023.  
  1024. I EXCLUDE ANY AND ALL IMPLIED WARRANTIES, INCLUDING WARRANTIES OF
  1025. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. I MAKE NO WARRANTY
  1026. OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS SOFTWARE,
  1027. ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
  1028. PURPOSE. I SHALL HAVE NO LIABILITY FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  1029. DAMAGES ARISING OUT OF OR RESULTING FROM THE USE OR MODIFICATION OF THIS
  1030. SOFTWARE.
  1031.  
  1032.                              -= END OF FILE =-
  1033.